﻿namespace Cpuss
{
    /// <summary>
    /// Tuple (int * int) of data associated with each process as it is running.
    /// </summary>
    public struct ProcessRunData
    {
        private readonly int _runnerTime;
        private readonly int _utilizedCpuTime;

        /// <summary>
        /// Intializes a new instance of <see cref="ProcessRunData"/>.
        /// </summary>
        /// <param name="utilizedCpuTime">Total time the process has utilized of the CPU.</param>
        /// <param name="runnerTime">Time of the runner.</param>
        internal ProcessRunData(int utilizedCpuTime, int runnerTime)
        {
            _utilizedCpuTime = utilizedCpuTime;
            _runnerTime = runnerTime;
        }

        /// <summary>
        /// Gets the number of nanoseconds (ns) the process has utilized the CPU for.
        /// </summary>
        public int UtilizedCpuTime
        {
            get { return _utilizedCpuTime; }
        }

        /// <summary>
        /// Gets the current time of the <see cref="Runner"/>.
        /// </summary>
        public int RunnerTime
        {
            get { return _runnerTime; }
        }
    }
}